The vast majority of users input commands and data into modern computers by typing on a keyboard. When a user depresses a key on a keyboard, a change in the current flowing through the circuit associated with that key occurs. The group of circuits associated with all the keys on a keyboard is known as a keyswitch matrix. The keyswitch matrix may be conveniently divided into rows and columns for efficient addressing. A microcontroller that is built into the keyboard, such as the Intel 8048, periodically scans the keyswitch matrix. Thus, the microcontroller detects the change in current from a depressed key. To distinguish between a current change that results from a depressed key and an aberrant current fluctuation that results from key bounce, the microcontroller scans the keyswitch matrix hundreds of times each second. Only current changes that last for two or more scans are acted upon by the microcontroller.
Depending on which key circuit carries the signal to the microcontroller, the microcontroller generates a number, called a scan code. Each key has a unique scan code. Next, the microcontroller stores the scan code in a keyboard memory buffer and then loads the scan code into a port that can be read by the computer's BIOS. The microcontroller then sends an interrupt signal over the keyboard cable to tell the BIOS that a scan code is waiting for it. The interrupt signal tells the BIOS to stop performing other operations and divert its attention to reading the scan code. Next, the BIOS reads the scan code from the keyboard port and sends a signal to the keyboard that tells the microcontroller that it may delete the scan code from its buffer. The BIOS then translates the scan code into an ASCII code that is placed in a memory buffer. Finally, the operating system retrieves the ASCII code. The above process is repeated in a periodic manner.
While the above method is utilized by almost all modern computers, the above method is not optimal. The primary disadvantage of the above method is that the electrical components in the keyboard have a significant power consumption. Today, in an effort to be environmentally conscious and to reduce utility bills, it has become important to reduce the power consumption of computers. In addition, the above method is not optimal for a wireless keyboard because any such keyboard utilizing the above method would have a very limited battery life. Thus, a need exists for a method and apparatus for reducing keyboard power consumption.